#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    index_dialog = new index(this);

    index_dialog->show();
    connect(index_dialog,SIGNAL(log_in_ok(bool)),this,SLOT(showWindow(bool)));

};

MainWindow::~MainWindow()
{
    delete ui;
}
void MainWindow::showWindow(bool judge){
    if(judge){
        this->show();
    }
}

void MainWindow::on_pushButton_clicked()
{
    //show plan Widget
    //this->plan_dialog->show();
    plan_dialog = new planWidget();
    plan_dialog->show();
}

void MainWindow::on_route_btn_clicked()
{
    route_dialog = new routeWidget();
    route_dialog->show();
}


void MainWindow::on_log_btn_clicked()
{
    wdown_dialog = new wdownWidget();
    wdown_dialog->show();
}

void MainWindow::on_export_btn_clicked()
{
    export_dialog = new exportWidget();
    export_dialog->show();
}
